package com.sxbbc.bank.service.impl;

import com.sxbbc.bank.service.IBankSubBranchService;
import com.sxbbc.common.core.entity.banks.BankSubBranch;
import com.sxbbc.common.core.mapper.banks.BankSubBranchMapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author 
 * @since 2020-09-07
 */
@Service
public class BankSubBranchServiceImpl extends ServiceImpl<BankSubBranchMapper, BankSubBranch> implements IBankSubBranchService {

    public Map<String,String> map(){
        List<BankSubBranch>  bankSubBranches=super.list();
        Map<String,String> map =new HashMap<>(bankSubBranches.size());
        for (int i = 0; i <bankSubBranches.size() ; i++) {
            map.put(bankSubBranches.get(i).getId().toString(),bankSubBranches.get(i).getBankName());
        }
        return map;
    }
}
